
<!-- 节点模板 -->
<script type="text/ng-template" id="nodes_renderer1.html">
    <div ui-tree-handle class="tree-node tree-node-content">
      <a class="btn btn-success btn-xs" data-nodrag ng-click="toggle(this)"><i class="fa fa-id-badge fa-lg"></i></a>
      <span type="text">{{node.title}}</span>
    </div>
    <ol ui-tree-nodes="" ng-model="node.nodes" ng-class="{hidden: collapsed}">
      <li ng-repeat="node in node.nodes" ui-tree-node ng-include="'nodes_renderer1.html'">
      </li>
    </ol>
</script>
<script type="text/ng-template" id="nodes_renderer2.html">
    <div class="tree-node">
        <div class="pull-left tree-handle" ui-tree-handle>
            <i class="fa fa-arrows fa-lg"></i>        
        </div>
        <div class="tree-node-content">
        <a class="btn btn-success btn-xs" data-nodrag ng-click="toggle(this)"><i class="fa fa-user-o fa-lg"></i></a>
        <span type="text">{{node.title}}</span>
        <a class="pull-right btn btn-danger btn-xs" data-nodrag ng-click="remove(this)"><i class="fa fa-close fa-lg"></i></a>
        </div>
    </div>
    <ol ui-tree-nodes="" ng-model="node.nodes" ng-class="{hidden: collapsed}">
        <li ng-repeat="node in node.nodes" ui-tree-node ng-include="'nodes_renderer2.html'">
        </li>
    </ol>
</script>

<div class="container-fluid">
    <div ng-controller='processManagePageCtrl' sv-root class="row processManage">
        <div class="mainContent col-xs-6 col-md-5 col-lg-5"  sv-part="modelArray1">
            <div class="mainContainer">
                <div class="windowHeader">
                    <h3>新增知识上报流程</h3>
                </div>
                <ul id='timeline'>
                    <li class='work' ng-repeat="item in processItems">
                        <input class='radio' id='{{item.nodeId}}' name='works' type='radio'>
                        <div class="relative">
                            <label for='{{item.nodeId}}' class="taskTitle">{{item.roleName}}</label>
                            <span class='date'>{{item.stepName}}</span>
                            <span class='circle'></span>
                            <div ng-if="removeBtn" class="removeBtn">
                                <i ng-click="removeProcess();" class="fa fa-close fa-lg"></i>
                            </div>
                        </div>
                        <div class='taskContent'>
                            <div class="taskDetail">
                                <span>{{item.roleDesc}}</span>                                
                            </div>
                        </div>
                    </li>
                </ul>
            </div>
            <div class="text-center">
                <button ng-click="addProcess();" type="button" class="btn btn-warning">新增节点</button>
                <div ng-click="removeBtn = !removeBtn" style="display: inline;">
                    <button ng-if="!removeBtn" type="button" class="btn btn-danger">删除节点</button>
                    <button ng-if="removeBtn" type="button" class="btn btn-danger">放弃删除</button>
                </div>
                <button type="button" class="btn btn-info">流程发布</button>
            </div>
            
        </div>
        <div class="mainSetter col-xs-3 col-md-3 col-lg-3">
            <div class="windowHeader">
                <h3>节点信息</h3>
            </div>
            <!-- <ol class="rounded-list">
                <li><a href="">当前节点</a>
                    <ol>
                        <li><a href="">步骤三</a></li>
                    </ol>
                </li>
                <li><a href="">当前负责角色</a>
                    <ol>
                        <li><a href="">系列经理</a></li>
                    </ol>
                </li>
                <li><a href="">当前负责人员</a>
                    <ol>
                        <li><a href="">张经理</a></li>
                        <li><a href="">赵经理</a></li>
                        <li><a href="">吴经理</a></li>
                    </ol>
                </li>                       
            </ol> -->
            <div ui-tree id="tree2-root" data-clone-enabled="true">
                <ol ui-tree-nodes="" ng-model="tree2">
                    <li ng-repeat="node in tree2" ui-tree-node ng-include="'nodes_renderer2.html'"></li>
                </ol>
            </div>
        </div>
        <div class="subSetter col-xs-3 col-md-3 col-lg-3">
            <div class="windowHeader">
                <h3>角色人员信息</h3>
            </div>
            <div class="search bar2">
                <form class="searchForm">
                    <input class="searchInput" type="text" placeholder="请输入您要搜索的内容...">
                    <button class="searchBtn" type="submit"></button>
                </form>
            </div>
            <div ui-tree id="tree1-root" data-clone-enabled="true" data-nodrop-enabled="true">
            <ol ui-tree-nodes="" ng-model="tree1">
                <li ng-repeat="node in tree1" ui-tree-node ng-include="'nodes_renderer1.html'"></li>
            </ol>
            </div>
        </div>
    </div>
</div>